<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../../resources/js-test.js"></script>
</head>
<body>
<div id="console"></div>

<script>
    shouldBe('document.evaluate(\'""\', document, null, XPathResult.STRING_TYPE, null).stringValue', '""');
    shouldBe('document.evaluate(\'"Hi"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"Hi"');
    shouldBe('document.evaluate(\'"NaN"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"NaN"');
    shouldBe('document.evaluate(\'"\u2022 = middle dot"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"\u2022 = middle dot"');
    shouldBe('document.evaluate(\'"0"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"0"');
    shouldBe('document.evaluate(\'"1"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"1"');
    shouldBe('document.evaluate(\'"2"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"2"');
    shouldBe('document.evaluate(\'"3"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"3"');
    shouldBe('document.evaluate(\'"4"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"4"');
    shouldBe('document.evaluate(\'"5"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"5"');
    shouldBe('document.evaluate(\'"31"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"31"');
    shouldBe('document.evaluate(\'"-1"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"-1"');
    shouldBe('document.evaluate(\'"-2"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"-2"');
    shouldBe('document.evaluate(\'"-3"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"-3"');
    shouldBe('document.evaluate(\'"-4"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"-4"');
    shouldBe('document.evaluate(\'"-5"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"-5"');
    shouldBe('document.evaluate(\'"3.1415926535"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"3.1415926535"');

    shouldBe('document.evaluate(\'0\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '0.0');
    shouldBe('document.evaluate(\'0.5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '0.5');
    shouldBe('document.evaluate(\'-0.5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-0.5');
    shouldBe('document.evaluate(\'1\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '1.0');
    shouldBe('document.evaluate(\'-1\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-1.0');
    shouldBe('document.evaluate(\'1.5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '1.5');
    shouldBe('document.evaluate(\'-1.5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-1.5');
    shouldBe('document.evaluate(\'2\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '2.0');
    shouldBe('document.evaluate(\'-2\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-2.0');
    shouldBe('document.evaluate(\'2.6\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '2.6');
    shouldBe('document.evaluate(\'-2.6\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-2.6');
    shouldBe('document.evaluate(\'3\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '3.0');
    shouldBe('document.evaluate(\'-3\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-3.0');
    shouldBe('document.evaluate(\'31\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '31.0');
    shouldBe('document.evaluate(\'4\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '4.0');
    shouldBe('document.evaluate(\'-4\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-4.0');
    shouldBe('document.evaluate(\'4.5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '4.5');
    shouldBe('document.evaluate(\'-4.5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-4.5');
    shouldBe('document.evaluate(\'5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '5.0');
    shouldBe('document.evaluate(\'-5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-5.0');
    shouldBe('document.evaluate(\'-42\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-42.0');

</script>
</body>
</html>
